<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>个人中心</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="import" href="indexs.html" id="page1">
    <script type="text/javascript" src="layui/layui.js"></script>
</head>

<body>
<script type="text/javascript">
    document.write(page1.import.body.innerHTML);
</script>
<div class="layui-row" style="margin-left: 400px" id="shownews">
    <!--<div class="layui-col-xs7">
<fieldset class="layui-elem-field">
    <legend>系统提示</legend>
    <div class="layui-field-box">
        <label style="float: left;margin-left: 50px">2018-09-09</label><br>
        <label style="font-size: 20px">12321312312</label>
    </div>
</fieldset>
    </div>-->
</div>
<script>
    $(document).ready(function () {
        showNews();
    })
    
    function showNews() {
        $.ajax({
            url:"News/showNews",
            data:{
                userid:1,
                usertype:0
            },
            success:function (data) {
                var content = "";
                for(var i = 0; i < data.length; i++){
                    content +='<div class="layui-col-xs7">\n' +
                        '<fieldset class="layui-elem-field">\n' +
                        '    <legend>系统提示</legend>\n' +
                        '    <div class="layui-field-box" style="text-align: center;">\n' +
                        '        <label style="float: left;margin-left: 50px">'+data[i].iTime+'</label><br>\n' +
                        '        <label style="font-size: 20px;">'+data[i].iText+'</label>\n' +
                        '    </div>\n' +
                        '</fieldset>\n' +
                        '    </div>'
                }
                $("#shownews").html(content);
            }
        })
    }
</script>
<!-- 你的HTML代码 -->
</body>
</html>